package com.repair.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class PageController {

    @GetMapping("/")
    public String index() {
        return "index";
    }

    @GetMapping("/login")
    public String login() {
        return "login";
    }

    @GetMapping("/register")
    public String register() {
        return "register";
    }

    @GetMapping("/profile")
    public String profile() {
        return "profile";
    }

    @GetMapping("/orders")
    public String orders() {
        return "orders";
    }

    @GetMapping("/repairman")
    public String repairman() {
        return "repairman";
    }

    @GetMapping("/admin")
    public String admin() {
        return "admin/index";
    }


    @GetMapping("/repairman/orders")
    public String repairmanDashboard() {
        return "repairman-orders";
    }

    @GetMapping("/repairman/profile")
    public String repairmanProfile() {
        return "repairman-profile";
    }

    // 公告详情页
    @GetMapping("/announcement")
    public String announcement() {
        return "announcement";
    }
    
    // 管理员公告管理页面
    @GetMapping("/admin/announcement")
    public String adminAnnouncement() {
        return "admin/announcement";
    }
    
    // 公告列表页面
    @GetMapping("/announcements")
    public String announcements() {
        return "announcements";
    }

    // 公告列表页面
    @GetMapping("/repairman-announcements")
    public String announcements2() {
        return "repairman-announcements";
    }
} 